Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #34428 - Update ContentCredentials controller in AngularJs for bookmarks #9936

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

chris1984
Copy link
Member

What are the changes introduced in this pull request?

We renamed the GPG Model to Content Credentials and forgot to update the AngularJS controller so it was pointing to the old name so bookmarks would fail, since the Foreman bookmarks controller looks at the controller's name.

Considerations taken when implementing this change?

I made sure to test bookmarks, assigning a gpg key to a product and a repo to verify that it still works. I did find a new bug before my fix where the gpgkey is showing correctly when you select the dropdown in the repo details page but it's blank upon render.

I have filed an issue here:

https://projects.theforeman.org/issues/34429

What are the testing steps for this pull request?

2021-12-15T09:39:15 [I|app|a2b62973] Started POST "/api/v2/bookmarks" for 10.40.193.18 at 2021-12-15 09:39:15 -0500
2021-12-15T09:39:15 [I|app|a2b62973] Processing by Api::V2::BookmarksController#create as JSON
2021-12-15T09:39:15 [I|app|a2b62973]   Parameters: {"name"=>"cc", "query"=>"", "public"=>true, "apiv"=>"v2", "bookmark"=>{"name"=>"cc", "query"=>"", "controller"=>"api/v2/bookmarks", "public"=>true}}
2021-12-15T09:39:15 [E|app|a2b62973] Unprocessable entity Bookmark (id: new):
 a2b62973 |   Search query can't be blank
 a2b62973 |   Controller katello_gpg_keys is not a valid controller
 a2b62973 | 
2021-12-15T09:39:15 [I|app|a2b62973]   Rendering api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout
2021-12-15T09:39:15 [I|app|a2b62973]   Rendered api/v2/errors/unprocessable_entity.json.rabl within api/v2/layouts/error_layout (Duration: 9.9ms | Allocations: 6444)
2021-12-15T09:39:15 [I|app|a2b62973] Completed 422 Unprocessable Entity in 38ms (Views: 16.1ms | ActiveRecord: 4.6ms | Allocations: 19236)
  • Apply PR and restart dev server
  • Try to make a bookmark, verify no errors in devel log and that it shows up in the dropdown list.

@theforeman-bot
Copy link

Issues: #34428

@lfu
Copy link
Member

lfu commented Feb 11, 2022

Created a content credential.
Made a credential search and bookmarked it.
The bookmark was saved into the list.

Wait for broken test to be fixed.

Copy link
Member

@lfu lfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@chris1984 chris1984 merged commit f7f4eab into Katello:master Feb 14, 2022
@chris1984 chris1984 deleted the fix-bulk branch February 14, 2022 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants